home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / EtchedBorderBeanInfo.java < prev    next >
Text File  |  1998-10-21  |  2KB  |  64 lines

  1. package com.symantec.itools.swing.borders;
  2.  
  3. import java.beans.*;
  4. import com.symantec.itools.vcafe.beans.PropertyDescriptorAttributes;
  5. import com.symantec.itools.vcafe.beans.PropertyHelpIDs;
  6.  
  7. public final class EtchedBorderBeanInfo
  8.     extends BorderBeanInfo
  9. {
  10.     public EtchedBorderBeanInfo()
  11.     {
  12.         super();
  13.         
  14.         set16x16ColorIconName("EtchedBorder.gif");
  15.     }
  16.     
  17.     protected Class getBeanClass()
  18.     {
  19.         return EtchedBorder.class;
  20.     }
  21.     
  22.     public PropertyDescriptor[] getPropertyDescriptors()
  23.     {
  24.         try
  25.         {
  26.             Class beanClass = getBeanClass();
  27.             
  28.             PropertyDescriptor etchTypePD = new PropertyDescriptor("etchType", beanClass);
  29.             etchTypePD.setPropertyEditorClass(EtchedTypePropertyEditor.class);
  30.             etchTypePD.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.ETCHEDBORDER_ETCH_TYPE_HELP_ID));
  31.             
  32.             PropertyDescriptor highlightColor = new PropertyDescriptor("highlightColor", beanClass);
  33.             highlightColor.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.ETCHEDBORDER_HIGHLIGHT_COLOR_HELP_ID));
  34.             
  35.             PropertyDescriptor shadowColor = new PropertyDescriptor("shadowColor", beanClass);
  36.             shadowColor.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.ETCHEDBORDER_SHADOW_COLOR_HELP_ID));
  37.             
  38.             PropertyDescriptor[] rv = {
  39.                     etchTypePD,
  40.                     highlightColor,
  41.                     shadowColor };
  42.             
  43.             return rv;
  44.                 
  45.         }
  46.         catch(IntrospectionException e)
  47.         {
  48.             e.printStackTrace();
  49.         }
  50.         
  51.         //Error, return no properties
  52.         return new PropertyDescriptor[0];
  53.     }
  54.  
  55.     protected void modifyBeanDescriptor(BeanDescriptor beanDescriptor)
  56.     {
  57.         super.modifyBeanDescriptor(beanDescriptor);
  58.         
  59.         beanDescriptor.setValue("WINHELP", winHelpID);
  60.     }
  61.     
  62.     protected final static String winHelpID = "0x60138";
  63. }
  64.